package com.sg.business.model.workevent;

import com.mobnut.db.model.IContext;
import com.sg.business.model.UserTask;
import com.sg.business.model.Work;
import com.sg.business.model.WorkEventNoticeRule;

public class TaskCompleteDelayEvent extends RuleBasedWorkEvent implements ITaskEvent{

	private final double delayInHours;
	private UserTask task;

	public TaskCompleteDelayEvent(Work work,UserTask task,double delayInHours, IContext context) {
		super(work, context);
		setRule(WorkEventNoticeRule.makeWorkEventNoticeRule(EVENT_WF_COMPLETE_DELAYED));
		this.delayInHours = delayInHours;
		this.task = task;
		setParameter("delayInHours", delayInHours);
		setParameter("task", task);

	}

	public double getDelayInHours() {
		return delayInHours;
	}
	
	public UserTask getTask() {
		return task;
	}

}
